home *** CD-ROM | disk | FTP | other *** search
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
-
- //------------------------------------------------------------------------------------------------------
- //- Static parameters
- //------------------------------------------------------------------------------------------------------
-
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
-
- struct CVertexShaderShadowInput
- {
- float4 Position : POSITION;
- float3 Weight : BLENDWEIGHT;
- float4 BoneIndex : BLENDINDICES;
- };
-
- //------------------------------------------------------------------------------------------------------
-
- struct CVertexShaderShadowOutput
- {
- float4 Position : POSITION;
- };
-
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
-
- CVertexShaderShadowOutput ShadowPass (const CVertexShaderShadowInput input);
-
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
-
- CVertexShaderShadowOutput ShadowPass (const CVertexShaderShadowInput input)
- {
- CVertexShaderShadowOutput output;
- CSkinningOutput skinOutput;
-
- float3 fakeNormal = (0.0f,0.0f,0.0f);
- float3 fakeBumpTangent = (0.0f,0.0f,0.0f);
- float3 fakeBumpNormal = (0.0f,0.0f,0.0f);
-
- skinOutput = ComputeSkinning4Bones (input.Position, fakeNormal, fakeBumpTangent, fakeBumpNormal,
- input.BoneIndex,input.Weight,BoneArray);
-
- output.Position = mul (skinOutput.SkinnedPosition,CameraProjection);
-
- return output;
- }
-
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
-
- technique tech_shadow
- <
- int Priority = 1;
- int TechniqueIndex = 0;
- int DeviceType = HWSHADER_ONLY;
- int LightingType = INTEGRATED_LIGHTING;
- string RenderingType = "Shadow";
- >
- {
- pass pass1
- {
- CullMode = CW;
- ZEnable = true;
- ZFunc = LESSEQUAL;
-
- ZWriteEnable = true;
- AlphaBlendEnable = false;
- AlphaTestEnable = false;
- FogEnable = false;
-
- VertexShader = compile vs_1_1 ShadowPass();
-
- PixelShaderConstant[0] = {0.0f,0.0f,0.0f,1.0f};
-
- PixelShader =
- asm
- {
- ps_1_1
-
- mov r0,c0
- };
- }
- }
-
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------